]> dgit.raspbian.org Git - gnome-shell.git/commit
switcherList: Stop using Shell.GenericContainer
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 28 Jun 2018 15:34:01 +0000 (12:34 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 9 Oct 2018 01:42:24 +0000 (22:42 -0300)
commitc6cea277ebb5dd40faf9aa5f850618176b8abc3d
treedf2b94f64c645c450935527442c200ff077a9c53
parent9a47b4b343018bf07fdf1c57b3bf6ffaf5c2be4e
switcherList: Stop using Shell.GenericContainer

This commit removes all the uses of Shell.GenericContainer from
SwitcherPopup.SwitcherList. Compared to the other patches, this
one was specially trickier to get right, and a few invasive
changes needed to be done.

The most noticeable one is that the allocation of the items is
done entirely by St.BoxLayout -- we don't manually allocate them
anymore. To make it work, get_preferred_width() had to calculate
the correct value. It now assumes that:

 * Minimum width: the minimum width of the widest child.
 * Natural width: the minimum width of the StBoxLayout (use it
   instead of the natural width to force the labels to ellipsize
   when too long.)

The AppIcon class became a St.Widget subclass as well, to override
get_preferred_width() and be able to keep the squared shape.

Besides that, add a new SwitcherButton class to reimplement squared
icons without having to resort to hacks in the size allocation
machinery. This class has a single vfunc override to ensure that it
is squared when the SwitcherList is.

The arrows indicating multiple windows are now in this._list
actor to the SwitcherPopup itself, since this._list automatically
manages its own children now.

At last, adapt (but preserve) the hack in CyclerPopup.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/153
js/ui/altTab.js
js/ui/ctrlAltTab.js
js/ui/switcherPopup.js